using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class PlayerWins : MonoBehaviour
{
    public ScoreManager Player1;
    public ScoreManager Player2;

    public TextMeshProUGUI text;
    
    // Start is called before the first frame update
    void Start()
    {
        if (Player1.GetScore() > Player2.GetScore())
        {
            text.text = "Player1 wins";
        } else if (Player2.GetScore() > Player1.GetScore()){
            text.text = "Player2 wins";
        } else {
            text.text = "Good Game";
        }

        
    }


}
